#include "../inc/inc.h"
#include "../inc/main.h"
#include "../inc/cmd.h"
#include "../inc/log.h"

char* GetCmdString(char cmdString[]);

int main(int argc, char const *argv[])
{
    logWrite("Start main fun");

    char cmdBuff[100];

    while(1)
    {
        cmdUsrTips();
        cmdHandle( GetCmdString(cmdBuff) );
    }
 
    
    return 0;
}

char* GetCmdString(char cmdString[])
{   
    fgets(cmdString, MAX_CMD_SIZE, stdin);
    int iLen = strlen(cmdString);
    cmdString[iLen - 1] = '\0'; 

    return cmdString;
}
